package com.huluobo.a2205parkdemo.adapter

import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.huluobo.a2205parkdemo.R

/**
 *  Created by LC on 2024/9/23.
 */
class CarImgAdapter : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_car_img) {
    override fun convert(helper: BaseViewHolder, item: String) {
        if (item == "+") {
            helper.setImageResource(R.id.item_car_img_iv, R.drawable.baseline_add_24)
        } else {
            Glide.with(context).load(item).into(helper.getView(R.id.item_car_img_iv))
        }
    }
}